package com.example.mapper;

import com.example.entity.Shouhuodizhi;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ShouhuodizhiMapper {

    void insert(Shouhuodizhi shouhuodizhi);

    void deleteById(Integer id);

    void updateById(Shouhuodizhi shouhuodizhi);

    List<Shouhuodizhi> selectAll(Shouhuodizhi shouhuodizhi);

    @Select("select * from shouhuodizhi where id = #{userId}")
    Shouhuodizhi selectById(Integer shouhuodizhi);
    @Select("select * from shouhuodizhi where user_id = #{userId} and shangpin_id = #{shangpinId}")
    Shouhuodizhi selectByUserId(Integer userId, Integer shangpinId);
}
